var express = require('express')
var app = express()
var path = require('path')

app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'ejs')
// app.use(express.bodyParser())
app.use('/public', express.static(path.join(__dirname, 'public')))
app.use('/libs', express.static(path.join(__dirname, 'libs')))

app.get('/', function (req, res) {
    res.render('index', {title: 'Express'})
})

app.get('/', function (req, res) {
    res.render('index', {title: 'Express'})
})

var server = app.listen(3000, function () {
    var addr = server.address()
    console.log('App listen at %s:%s', addr.address, addr.port)
})